export const pokemonData2Proxy = (p, teamId, teamIndex = 0) => ({
    teamId: teamId,
    id: teamId * 50 + teamIndex * 10 + p.index,
    name: p.name,
    form: p.number * 100 + p.form,
    lv: p.lv,
    gender: p.gender,
    abilityIndex: p.abilityIndex, ///
    nature: p.nature,
    happiness: p.happiness,
    item: p.item,
    moves: p.moves.map(m => ({ id: m, pp: 20 }) ),
    hp: 100,
    state: 'normal',
    atkContext: {},
    defContext: {},
    speed: 1,
    weight: 0,
    coordY: 0,
})

export const pokemonData2Sim = (p, id, teamId)=> ({
    id: id,
    teamId: teamId,
    name: p.name,
    gender: p.gender,
    form: p.number * 100 + p.form,
    form0: p.number * 100 + p.form,
    level: p.lv,
    abilityIndex: p.abilityIndex,
    nature: p.nature,
    happiness: p.happiness,
    item: p.item,
    moves: p.moves,
    iv: p.iv,
    ev: p.ev,
    hp: {value: 100, max: 100},
    fiveD: {atk: 100, def: 100, spAtk: 100, spDef: 100, speed: 100}, 
    item: p.item,
    status: 'normal',
    indexInOwner: p.index,
})